<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/template.xhtml">
	<ui:define name="content">
		<f:view>
			<h:form>
				<br/>
				
				<h:messages class="myError" id="errors" />
				
							
				<div class="middle">
				<h3><h:outputText value="#{msg.TG_createRequest_createReq}" /></h3>
				</div>



				<h:panelGrid columns="2" class="panelGrid">
					<h:outputText value="#{msg.TG_createRequest_description}"></h:outputText>
					<h:inputTextarea id="description"
						requiredMessage="#{msg.TG_createRequest_requiredMessage1}"
						required="true" value="#{requestBean.description}">
					</h:inputTextarea>
					<h:outputText value="#{msg.TG_createRequest_resource}"></h:outputText>

					<h:selectOneMenu value="#{requestBean.resourceId}"
						valueChangeListener="#{requestBean.valueChange}" required="true"
						requiredMessage="There is no resource available.">
						<f:selectItems value="#{requestBean.resources}" var="res"
							itemLabel="#{res.name}&amp;nbsp;#{res.idnumber}"
							itemValue="#{res.id}" />
						<f:ajax render="resource" event="click" />
					</h:selectOneMenu>
				</h:panelGrid>
				<br/>
				<div class="middle">
					<h:inputTextarea disabled="true" id="resource"
						value="#{requestBean.detail}" />
					<br/>
					<h:commandButton class="button"
						value="#{msg.TG_createRequest_sendReqButton}"
						actionListener="#{requestBean.insertTechTicket}">
					</h:commandButton>
					<br/>
				</div>
			</h:form>

		</f:view>
	</ui:define>
</ui:composition>
</html>